<include file="Common@header:header"/>

<script src="__PUBLIC__/static/jquery-1.10.2.min.js"></script>
<include file="Common@sitting:sitting"/>

<!--main-->
<div class="user_main">

    <div class="uMain_content">

        <div class="main_nav2">
            <ul class="tabUl">
                <li class="current" id="cprofile"><a href="javascript:void(0)"><span>修改资料</span></a></li>
                <li id="cavatar"><a href="javascript:void(1)"><span>修改头像</span></a></li>
                <li id="cpassword"><a href="javascript:void(2)"><span>修改密码</span></a></li>
            </ul>

        </div>
        <div class="minHeight500">
            <!--修改基本资料-->
            <form id="doprofile" action="" method="post">
                <div id="modifyProfile" class="profile">
                    <div class="title">
                        <div class="name">修改资料</div>
                    </div>
                    <ul>
                        <li>
                            <div class="name">*昵称：</div>
                            <div class="input92cc"><input id="rnickname" class="input" name="nickname"
                                                          style="width: 190px;" type="text"></div>
                            <div id="mnickname" class="input_msg"></div>
                        </li>
                        <li>
                            <div class="name">手机号：</div>
                            <div class="input92cc"><input id="rnickname" class="input" name="nickname"
                                                          style="width: 190px;" type="text"></div>
                            <div id="mnickname" class="input_msg"></div>
                        </li>
                        <li>
                            <div class="name">QQ：</div>
                            <div class="input92cc"><input id="rnickname" class="input" name="nickname"
                                                          style="width: 190px;" type="text"></div>
                            <div id="mnickname" class="input_msg"></div>
                        </li>

                        <li>
                            <div class="name">性　　别：</div>
                            <div class="input92cc">
                                <select id="rsex" class="select_normal" name="sex" style="width: 70px;">
                                    <option selected="selected" value="1">未 知</option>
                                    <option value="1">帅 哥</option>
                                    <option value="2">美 女</option>
                                </select>
                            </div>
                        </li>
                        <li>
                            <div class="name">个人介绍：</div>
                            <div class="input92cc"><textarea name="about" cols="30" rows="7" id="rselfIntroduce"
                                                             class="input"
                                                             style="height: 100px; width: 280px;"></textarea></div>
                            <div id="mselfIntroduce" class="input_msg"></div>
                        </li>

                        <li>
                            <div class="name"></div>
                            <div> <span class="button-main"> <span>
                  <button id="seveProfile" type="button">保存修改</button>
                  </span> </span></div>
                        </li>
                    </ul>
                </div>
            </form>
            <!--修改头像-->
            <div id="modifyAvatar" class="profile" style="display: none;">
                <div class="title">
                    <div class="name">修改头像</div>
                </div>
                <div class="avatar_box">
                    <!--<div class="avatarTitle"> 当前头像<span style="margin-left: 180px;">设置头像</span></div>-->
                    <!--<div class="myAvatar">-->
                    <!--<img class="avatar-160" id="my-avatar" src="180.html"-->
                    <!--onerror="this.src='http://u.abc3210.com/statics/extres/member/images/noavatar.jpg'"-->
                    <!--height="120" width="120">-->
                    <!--</div>-->
                    <div class="myAvatarUpload" id="altContent"
                         style="border: 0px solid rgb(231, 231, 231); display: inline; float: left; height: 450px; margin-bottom: 10px; padding-left: 10px; width: 650px;">

                        <script type="text/javascript"
                                src="__PUBLIC__/static/FaustCplus/swfobject.js"></script>
                        <script type="text/javascript">
                            function uploadevent(status) {
                                status += '';
                                switch (status) {

                                    case '1':
                                        alert('修改成功！!');
                                        var time = new Date().getTime();
                                            $.ajax({
                                                url: "",
                                                success: function () {
                                                    window.location = location;
                                                }
                                            });

                                        break;

                                    case '2':
                                        if (confirm('js call upload')) {
                                            return 1;
                                        } else {
                                            return 0;
                                        }
                                        break;

                                    case '-1':
                                        alert('cancel!');
                                        window.location.href = "#";
                                        break;
                                    case '-2':
                                        alert('upload failed!');
                                        window.location.href = "#";
                                        break;

                                    default:
                                        alert(typeof(status) + ' ' + status);
                                }
                            }

                            var flashvars = {
                                "jsfunc": "uploadevent",
                                "imgUrl": "",
                                "pid": "75642723",
                                "uploadSrc": true,
                                "showBrow": true,
                                "showCame": true,
                                "uploadUrl": "{{:U('Home/User/saveavater', array('action'=> 'uploadavatar'))}}",
                                "pSize": "300|300|120|120|80|80|45|45"
                            };

                            var params = {
                                menu: "false",
                                scale: "noScale",
                                allowFullscreen: "true",
                                allowScriptAccess: "always",
                                wmode: "transparent",
                                bgcolor: "#FFFF55"
                            };

                            var attributes = {
                                id: "FaustCplus"
                            };

                            swfobject.embedSWF("__PUBLIC__/static/FaustCplus/FaustCplus.swf", "altContent", "650", "450", "9.0.0", "expressInstall.swf", flashvars, params, attributes);

                        </script>
                    </div>
                </div>
            </div>
            <!--修改密码-->
            <form method="post" action="{{:U('Home/User/updatePasswod')}}">
                <div id="modifyPassword" class="profile" style="display: none;">
                    <div class="title">
                        <div class="name">修改密码</div>
                    </div>
                    <ul>
                        <li>
                            <div class="name">当前密码：</div>
                            <div class="input92cc">
                                <input id="roldpassword" class="input_normal input" maxlength="20" name="old"
                                       style="width: 190px;" type="password">
                            </div>
                            <div id="moldpassword" class="input_msg">请输入您当前使用的密码。</div>
                        </li>
                        <li>
                            <div class="name">设置新密码：</div>
                            <div class="input92cc">
                                <input id="rpassword" class="input_normal input" maxlength="20" name="password"
                                       style="width: 190px;" type="password">
                            </div>
                            <div id="mpassword" class="input_msg">6到20个字符，请使用英文字母（区分大小写）、符号或数字。</div>
                        </li>
                        <li>
                            <div class="name">确认新密码：</div>
                            <div class="input92cc">
                                <input id="rpassword2" class="input_normal input" maxlength="20" name="repassword"
                                       style="width: 190px;" type="password">
                            </div>
                            <div id="mpassword2" class="input_msg">再次输入您所设置的密码，以确认密码无误。</div>
                        </li>
                        <li>
                            <div class="name"></div>
                            <div class="input92cc"> <span class="button-main"> <span>
                 <input type="submit" name="sub" value="修改密码">
                  </span> </span></div>
                        </li>
                    </ul>
                </div>
            </form>
        </div>
    </div>


</div>
<!--main-->


<div style="clear: both;"></div>
<include file="Common@footer:footer"/>
<script type="text/javascript">
    $(function () {
        $('.tabUl li').click(function () {
            $(this).addClass('current').siblings().removeClass('current');
            var num = $('.tabUl li').index(this);
            $('.profile').hide().eq(num).show();
        });
    })

</script>